<?php

namespace app\index\controller;

use think\Controller;

class DataInfo extends Controller
{
    // 轮播数据
    public static function getBanner()
    {
        // 设置别名
        $sqlfield = 'banner_id as vod_id,banner_title as vod_title,banner_pic as vod_pic,banner_url as vod_url,banner_sort as vod_sort,banner_type as vod_type,banner_click as vod_click,banner_close as vod_close,DATE_FORMAT(banner_time, "%Y-%m-%d %H:%s") as vod_time';
        //    获取数据
        $banner = db('v1_banner')->where("banner_close", "on")->field($sqlfield)->select();
        return $banner;
    }
}
